package com.notary.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author xujun
 * @since 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysLog对象", description = "系统日志")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "操作IP")
    private String ip;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "操作人")
    private String userName;

    @ApiModelProperty(value = "操作描述")
    private String description;

    @ApiModelProperty(value = "请求方法")
    private String actionMethod;

    private String actionUrl;

    @ApiModelProperty(value = "请求参数")
    private String params;

    @ApiModelProperty(value = "浏览器")
    private String browser;

    @ApiModelProperty(value = "类路径")
    private String classPath;

    @ApiModelProperty(value = "请求方法")
    private String requestMethod;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "完成时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date finishTime;

    @ApiModelProperty(value = "消耗时间")
    private Long consumingTime;

    @ApiModelProperty(value = "执行状态")
    private String resultCode;

    @ApiModelProperty(value = "执行结果")
    private String resultMsg;

    @ApiModelProperty(value = "操作地点")
    private String location;

    @ApiModelProperty(value = "操作系统")
    private String os;


}
